<template>
    <h3>用户投资</h3>
    用户投资项目<input type="text" v-model="Sharinfo.UIName">
    投资时间<input type="date" v-model="Sharinfo.Stime">
    -<input type="date" v-model="Sharinfo.Etime">
    <input type="button" value="查询" @click="Show">
    <table border="1">
        <tr>
            <td>用户名称</td>
            <td>用户投资金额</td>
            <td>投资时间</td>
        </tr>

        <tr v-for="item in info">
            <td>{{item.UIName}}</td>
            <td>200</td>
            <td>{{item.UITime}}</td>

        </tr>
    </table>


</template>


<script setup lang="ts">
import {ref,onMounted} from 'vue';
import axios from 'axios';


onMounted(()=>{
    Show();
})

const info=ref({
    UIName:"",
    UITime:"",
})

const Sharinfo=ref({
    UIName:"",
    Stime:"",
    Etime:"",

})

const Show=()=>{
   axios.get("http://localhost:4611/api/Invest/ShowUserInvest",{
    params:{
        UIName:Sharinfo.value.UIName,
        Stime:Sharinfo.value.Stime,
        Etime:Sharinfo.value.Etime,
    }
   })
   .then(res=>{
        info.value=res.data
   })
}


</script>